# find Chart.yaml in  path  /var/ftp/acmis/helm
charts=$(find .|grep Chart.yaml)
for chart in $charts
do
echo ">>>>>>>>>>>>>${chart}"
old_version=$(cat $chart|grep version|awk -F"." '{print $3}')
current_version=`expr $old_version + 1`

echo from $old_version ---------- to $current_version
echo $chart|xargs -t -I {} sed -i "s/^version:.*/version: 1.0.${current_version}/"  {}
echo -n "current file version is " && cat $chart|grep version

#echo $chart|xargs -t -I {} sed -i 's/hub: registry.cn-chengdu.aliyuncs.com/hub: registry.cn-chengdu.aliyuncs.com/'   {}
done

#echo $chart
#sed "s/(version):/versionsdjfl\0/"  /var/ftp/acmis/helm/phoenix/Chart.yaml
